home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / Kubuntu 8.10 / kubuntu-8.10-desktop-i386.iso / casper / filesystem.squashfs / var / lib / dpkg / info / ifupdown.preinst < prev    next >
Text File  |  2008-10-12  |  672b  |  28 lines

  1. #!/bin/sh
  2. set -e
  3.  
  4. if [ ! -d /etc/network ]; then
  5.   mkdir -p /etc/network
  6. fi
  7.  
  8. if [ -f /etc/network/interfaces ] && ! grep -q '^[^#]' /etc/network/interfaces
  9. then
  10.   f=/etc/network/interfaces
  11.   if [ `md5sum < $f | cut -f1 -d ' '` = "4ed352919f69a77ad302ad1593204405" ]; then
  12.     if [ `wc -c < /etc/network/interfaces` -eq 2466 ]; then
  13.       echo -n "Removing old dummy /etc/network/interfaces: "
  14.       rm /etc/network/interfaces
  15.       echo "done."
  16.     fi
  17.   fi
  18. fi
  19.  
  20. if [ ! -f /etc/network/interfaces ]; then
  21.   cat <<EOF >/etc/network/interfaces
  22. # Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
  23. # /usr/share/doc/ifupdown/examples for more information.
  24. EOF
  25. fi
  26.  
  27.  
  28.